package com.zy.order.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zy.order.dao.OrderDao;
import com.zy.order.pojo.Order;
import com.zy.order.pojo.OrderInfo;
import com.zy.order.service.OrderService;

@Service
public class OrderServiceImpl implements OrderService{
	@Autowired
	private OrderDao orderDao;

	public List<Order> selectAllOrder() {
		List<Order> list=orderDao.selectAllOrder();
		return list;
	}

	public boolean addOrder(Order order) {
		int n  =orderDao.addOrder(order);
		return n>0;
	}

	public boolean addOrderInfo(OrderInfo orderInfo) {
		int n =orderDao.addOrderInfo(orderInfo);
		return n>0;
	}

	
}
